//package com.shu.config;
//
//import org.springframework.boot.autoconfigure.AutoConfigureAfter;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.jdbc.datasource.DataSourceTransactionManager;
//import org.springframework.transaction.PlatformTransactionManager;
//import org.springframework.transaction.annotation.TransactionManagementConfigurer;
//
//import javax.annotation.Resource;
//import javax.sql.DataSource;
//
///**
// * Created by shu on 2017/8/14.
// */
//@Configuration
//public class TransactionConfig implements TransactionManagementConfigurer{
//
//    @Resource(name = "dynamicDataSource")
//    private DataSource dataSource;
//
//    @Bean(name = "transactionManager")
//    @Override
//    public PlatformTransactionManager annotationDrivenTransactionManager() {
//        return new DataSourceTransactionManager(dataSource);
//    }
//}
